<!--// colorset의 값에 따라 css 파일을 import 한다 -->
<!--@if($colorset=="black")-->
    <!--%import("css/black.css")-->
<!--@elseif($colorset=="white")-->
    <!--%import("css/white.css")-->
<!--@else-->
    <!--%import("css/default.css")-->
<!--@end-->

<!--%import("./filter/login.xml")-->
<!--%import("./filter/openid_login.xml")-->
<!--%import("./js/login.js")-->

<script>
    var keep_signed_msg = "{$lang->about_keep_signed}";
    xAddEventListener(window, "load", function(){ doFocusUserId("fo_login_widget"); });
</script>


<form action="{getUrl('','act','procMemberLogin')}" method="post" ruleset="@login" id="fo_login_widget" class="fo_login_widget">
	<fieldset id="login" class="login_{$colorset}">
	<legend>{$lang->cmd_login}</legend>
	<input type="hidden" name="act" value="procMemberLogin" />
	<input type="hidden" name="success_return_url" value="{htmlspecialchars(getRequestUriByServerEnviroment())}" />
	<h2>Login</h2>
    <div class="idpwWrap">
        <div class="idpw">
            <input name="user_id" type="text" title="<!--@if($member_config->identifier != 'email_address')-->{$lang->user_id}<!--@else-->{$lang->email_address}<!--@end-->" />
            <input name="password" type="password" title="{$lang->password}" />
        </div>
		<p class="save">
        <input type="checkbox" name="keep_signed" id="keepid" value="Y" onclick="if(this.checked) return confirm(keep_signed_msg);" />
        <label for="keepid">{$lang->keep_signed}</label>

        <!--@if($member_config->enable_openid=='Y')-->
        <br />
        <input name="use_open_id" id="use_open_id" type="checkbox" value="Y" onclick="toggleLoginForm(this); return false;" />
        <label for="use_open_id">Open ID</label>
        <!--@end-->
		</p>
        <p class="login_mod"><input type="image" src="./images/{$colorset}/buttonLogin.gif" alt="login" class="login" /></p>
    </div>
    <p cond="$ssl_mode" class="securitySignIn <!--@if($ssl_mode)-->SSL<!--@else-->noneSSL<!--@end-->">
        <a href="#" onclick="toggleSecuritySignIn(); return false;">{$lang->security_sign_in}</a>
    </p>
    <ul class="help">
        <li class="first-child"><a href="{getUrl('act','dispMemberSignUpForm')}">{$lang->cmd_signup}</a></li>
        <li><a href="{getUrl('act','dispMemberFindAccount')}">{$lang->cmd_find_member_account}</a></li>
    </ul>
	</fieldset>
</form> 

<!-- OpenID -->
<!--@if($member_config->enable_openid=='Y')-->
<form action="{getUrl('module','member','act','procMemberOpenIDLogin')}" method="post" onsubmit="return procFilter(this, openid_login)" >
<fieldset id="openid_login" class="openid_login_{$colorset}" style="display:none;">
<legend>{$lang->cmd_login}</legend>
      <div class="idpwWrap">
        <div class="idpw">
          <p>{$lang->openid}</p>
          <input type="text" name="openid" class="openid_user_id" />
        </div>
        <input type="image" src="./images/{$colorset}/buttonLogin.gif" alt="login" class="login" />
      </div>
      <p class="save">
          <input name="use_open_id" id="use_open_id_2" type="checkbox" value="Y" onclick="toggleLoginForm(this); return false;"/>
          <label for="use_open_id_2">Open ID</label>
      </p>
</fieldset>
</form>
<!--@end-->

<script>
  xAddEventListener(window, "load", function(){ doFocusUserId("fo_login_widget"); });
</script>
